package com.tingyuge.base.thread.wang.complatefuture;

import java.util.HashMap;
import java.util.concurrent.*;
import java.util.stream.IntStream;

/**
 * Created by xiaodao
 * date: 2020/2/4
 */
public class CompletableFutureTest2 {

    public static void main(String[] args) throws ExecutionException, InterruptedException {

        CompletableFuture.allOf(CompletableFuture.runAsync(()->{
            IntStream.range(1,10).parallel().forEach(i->{
                System.out.println("a "+i);
            });
        }),
                CompletableFuture.runAsync(()->{
                    IntStream.range(1,10).parallel().forEach(i->{
                        System.out.println("b "+i);
                    });
                })
                ).get();
        System.out.println(1);

        HashMap<Object, Object> objectObjectHashMap = new HashMap<>();
        objectObjectHashMap.put("1","1");
        System.out.println(4*(6^5+6^4+6^3)+18);

    }



}
